import '@/utils/request'
import service from '@/utils/request'
// eslint-disable-next-line no-unused-vars
import qs from 'qs'
// eslint-disable-next-line no-unused-vars
const { httpPostForm, httpPost, httpGet } = service

// 根据条件分页查询砼配合比管理
const concreteMixProportionManagement = ({ params, url }) => {
    return httpPost({
        url: `/material/concreteMixProportionManagement/listByEntity?${qs.stringify(url)}`,
        params
    })
}

// 获取砼数据
const getcategoryLibrary = params => {
    return httpGet({
        // url: '/material/categoryLibrary/listChildrenByClassName',
        url: '/material/categoryLibrary/listConcreteMixProportionCategory',
        params
    })
}

// 新增砼配合比管理
const AddConcreteMirtune = params => {
    return httpPost({
        url: '/material/concreteMixProportionManagement/create',
        params
    })
}
// 根据条件分页查询砼配合比管理
const getConcreteMirtune = params => {
    return httpPost({
        url: '/material/concreteMixProportionManagement/listByEntity',
        params
    })
}
//修改砼配合比管理
const EditConcreteMirtune = params => {
    return httpPost({
        url: '/material/concreteMixProportionManagement/update',
        params
    })
}
//修改砼配合比管理明细
const EditConcreteMirtuneList = params => {
    return httpPost({
        url: '/material/concreteMixProportionManagement/updateList',
        params
    })
}
export {
    concreteMixProportionManagement,
    getcategoryLibrary,
    getConcreteMirtune,
    AddConcreteMirtune,
    EditConcreteMirtune,
    EditConcreteMirtuneList,
}
